<?
session_start();
include('conn.php');
$qry1 = "SELECT * from customermast where status=0 and custtype= 'VENDOR' order by custid desc";

$qry = mysql_query($qry1);
$data = array();
$i=1;
while($rows = mysql_fetch_array($qry)) 
{
	$data[] = array("Sr_NO" => $i++,
        			"prefx" => $rows['prefx'],
					"Name" => $rows['custdesc'],
				  "Address" => $rows['address'],
				  "city" => $rows['city'],
				  "custtype"=> $rows['custtype'],
				  "email"=> $rows['email'],
				  "phoneno"=> $rows['phoneno'],
                    "status"=> $rows['status'],
                   "custid"=> $rows['custid']
				  );
}
echo json_encode($data);
?>